#include "line.h"

#include <stdio.h>

//----------------------------------------------------------------------

Line::Line( Screen* s, bool l ) {
	screen = s;
	left = l;
	x = 10;
	screen->setLine( x, left );
}
		
//----------------------------------------------------------------------

void Line::move( Direction d ) {
	if( d == UP && x > 1 ) {
		x--;
	} else if( d == DOWN && x < 20 ) {
		x++;
	}
	
	screen->setLine( x, left );
}

//----------------------------------------------------------------------
